<meta http-equiv="Content-type" content="text/html" charset="UTF-8">
<head>
    <#include "../../common/header.ftl">

    <title>查询的待评价列表</title>
</head>
<body>
<div class="content-wrapper" style="display: flex">
    <div class="nav-wrapper" style="flex: 0 0 200px;width: 200px">
        <#include "../../common/nav.ftl">
    </div>
    <div id="page-content-wrapper" style="flex: 1;margin-left: 20px;margin-top: 100px">
        <div class="col-md-12 column">
            <table class="table" table-bordered style="margin-top: 20px">
                <thead>
                <tr>
                    <th>
                        订单id
                    </th>
                    <th>
                        订单总价
                    </th>
                    <th>
                        订单状态
                    </th>
                    <th>
                        地址
                    </th>
                    <th>
                        创建时间
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                </thead>
                <tbody>
                <#list pages.getContent() as pageItem>
                <tr class="success">
                    <td>
                        ${pageItem.orderId}
                    </td>
                    <td>
                        ${pageItem.orderAmount}
                    </td>
                    <td>
                        ${pageItem.orderStatus}
                    </td>
                    <td>
                        ${pageItem.buyerAdderss}
                    </td>
                    <td>
                        ${pageItem.createTime}
                    </td>
                    <td>
                        <input type="button" value="取消订单" onclick="sellCancel('${pageItem.orderId}')"/>
                    </td>
                </tr>
                </#list>
                </tbody>
            </table>
            <ul class="pagination pull-right">

            <#--<!--显示订单列表&ndash;&gt;
                <#list pages.getContent() as pageItem>
                    订单id：  ${pageItem.orderId}<br>
                    订单总价： ${pageItem.orderAmount}<br>
                    订单状态: ${pageItem.orderStatus}<br>
                    地址：    ${pageItem.buyerAdderss}<br>
                    创建时间：${pageItem.createTime}<br>
                    <input type="button" value="取消订单" onclick="sellCancel('${pageItem.orderId}')"/>
                    <br>
                    <br>
                </#list>-->

                <!--显示上一页-->
            <#if currentPage lt 2>
                        <li class="disabled"><a href="#">上一页</a></li>
            <#else>
                        <li>
                            <a href="/sell/order/admin/findcommentorderbetween?currentPage=${currentPage - 1}&size=${size}&openid=${openid}">上一页</a>
                        </li>
            </#if>

                <!--显示当前页-->
            <#list 1..pages.getTotalPages() as index>
                <#if index == 0>
                <#elseif currentPage == index>
                    <li class="disabled"><a href="#">${index}</a></li>
                <#else>
                    <li>
                        <a href="/sell/order/admin/findcommentorderbetween?currentPage=${index}&size=${size}&openid=${openid}">${index}</a>
                    </li>
                </#if>
            </#list>

                <!--显示下一页-->
             <#if currentPage gte pages.getTotalPages()>
                        <li class="disabled"><a href="#">下一页</a></li>
             <#else>
                        <li>
                            <a href="/sell/order/admin/findcommentorderbetween?currentPage=${currentPage + 1}&size=${size}&openid=${openid}">下一页</a>
                        </li>
             </#if>
            </ul>
        </div>
    </div>
</div>

<script>
    function sellCancel(orderId) {
        var openid = "${openid}";
        alert(openid + " " + orderId);
        this.location.href = "/sell/order/admin/sellercancel?openid=" + openid + "&orderId=" + orderId;
    }
</script>
</body>

